package com.kpj.app;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class ZakkMainActivity extends Activity {
	private Button	keyboardButton;
	private Button	sliderButton;
	private OnClickListener clickListener = new OnClickListener() {

		@Override
		public void onClick(View v) {
			Intent intent = null;
			
			switch (v.getId()) {
			case R.id.btn_main_keyboard:
				intent = new Intent(ZakkMainActivity.this, KeyboardTestActivity.class);
				break;
			
			case R.id.btn_main_slider:
				intent = new Intent(ZakkMainActivity.this, SliderTestActivity.class);
				break;
			}
			
			startActivity(intent);
		}
		
	};
	
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.zakk_main);
		
		init();
	}
	
	private void init() {
		keyboardButton = (Button) findViewById(R.id.btn_main_keyboard);
		sliderButton = (Button) findViewById(R.id.btn_main_slider);
		keyboardButton.setOnClickListener(clickListener);
		sliderButton.setOnClickListener(clickListener);
	}
}
